﻿using System;
using NetCore.CustomAttributes;
using NetCore.Enums;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace NetCore.Entities.Needs
{
    /// <summary>
    /// 需求
    /// </summary>
    [Description("需求")]
    public class Need : BaseEntity
    {
        public Need()
        {
            Attachments = new HashSet<NeedAttachment>();
        }
        /// <summary>
        /// 客户名称
        /// </summary>
        [Description("客户名称"), Required]
        public string Name { get; set; }
        /// <summary>
        /// 性别
        /// </summary>
        [Description("性别")]
        public Sex? Sex { get; set; }
        /// <summary>
        /// 手机
        /// </summary>
        [Description("手机")]
        public string Phone { get; set; }
        /// <summary>
        /// QQ
        /// </summary>
        [Description("QQ")]
        public string QNumber { get; set; }
        /// <summary>
        /// 邮箱
        /// </summary>
        [Description("邮箱")]
        public string Email { get; set; }
        /// <summary>
        /// 需求明细
        /// </summary>
        [Description("需求明细"), Required]
        public string Requirements { get; set; }
        /// <summary>
        /// 附件
        /// </summary>
        [Description("附件"), NotSet]
        public virtual HashSet<NeedAttachment> Attachments { get; set; }

        /// <summary>
        /// 是否阅读邮件
        /// </summary>
        [Description("是否阅读邮件")]
        public bool IsRead { get; set; }
        /// <summary>
        /// 阅读邮件时间
        /// </summary>
        [Description("阅读邮件时间")]
        public DateTime? ReadTime { get; set; }
    }
}
